<%- model_class = @user.class -%>
<div class="page-header">
  <h1><%= @user.name %></h1>
</div>

<div class="span12">
  <div class="row show-grid">
    <div class="span4">
      <h2> Info </h2>
      <table class='table'>
        <tbody>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:name) %></strong></td>
            <td><%= @user.name %>
          </tr>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:email) %></strong></td>
            <td><%= @user.email %>
          </tr>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:hometown) %></strong></td>
            <td><%= @user.hometown %>
          </tr>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:current_sign_in_ip) %></strong></td>
            <td><%= @user.current_sign_in_ip %>
          </tr>
          <tr>
            <td><strong><%= model_class.human_attribute_name(:current_sign_in_at) %></strong></td>
            <td><%= @user.current_sign_in_at %>
          </tr>
        </tbody>
      </table>
    </div>
    <div class= 'span2 friends'>
      <h2>Friends</h2>
      <%= render 'friends_collection', { :users => @user.friends, :friendship_requests => false } %>
    </div>
    <div class= 'span3 pending'>
      <h2>Pending Requests</h2>
      <%= render 'friends_collection', { :users => @user.friends_pending, :friendship_requests => true } %>
      </div>
    <div class= 'span2'>
      <h2>My Requests</h2>
      <%= render 'friends_collection', { :users => @user.requested_friends, :friendship_requests => false } %>
    </div>
  </div>

  <div class="row" style="padding-top: 30px">
    <dic class="span4">
    <%= link_to t('Index', :default => t("helpers.links.index")),
      users_path, :class => 'btn'  %>
    <%= link_to("Logout", destroy_user_session_path, :method => :delete, :class => 'btn btn-danger') %>
  </div>
</div>
